<?php
use Base\BaseController;
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidResponseException;
use WeChat\Receive;

class EventController extends BaseController
{
	public function indexAction(): void
    {
        try {
            $config = Config::get("wechat");
            new Receive([
                'appid' => $config['AppId'],
                'appsecret' => $config['AppSecret'],
                'token'=>$config['Token']
            ]);
        } catch (InvalidResponseException|Exception $e) {
            throw new InvalidArgumentException($e->getMessage());
        }
	}
}
